#include <stdio.h>
#include <stdlib.h>

int main()
{
    FILE *fp = fopen("log.txt", "a");
    if(fp == NULL)
    {
        perror("fopen fail\n");
        exit(1);
    }

    fprintf(fp, "hello file, %d, %s, %lf\n", 10, "hf", 3.1415);
    
    fclose(fp);

    return 0;
}
